<?php
require_once '../dbms_university_courses_mvc/Connection.php';

$username = $_GET['username'];
$password = $_GET['password'];

$sql = "SELECT profile_id FROM profiles WHERE username = '$username' AND password = '$password'";

$result = mysql_query($sql, $dbms_university_courses_connection);
if (!$result) {
    die('Could not query:' . mysql_error());
}

if(mysql_num_rows($result) > 0){
	$_SESSION['profile_id'] = mysql_result($result, 0);
	echo "true";
}
else{
	echo "false";
}

?>